package generics;

import java.lang.reflect.Field;

public class MyClass <T>{
    private T msg;
//    private E num;
    public <T> T test(T t){
        System.out.println(t);
        return t;
    }

    public static void main(String[] args) {
        MyClass<String> cls1=new MyClass<>();
        MyClass<Integer> cls2=new MyClass<>();
       System.out.println(cls1.getClass()==cls2.getClass());
//        MyClass<String,Integer> myClass=new MyClass<>();
//        Class cls=myClass.getClass();
//        Field[] fields=cls.getDeclaredFields();
//        for (Field field:fields){
//            System.out.println(field.getType());
        }
    }

